﻿@using ShowPin.MvcPaging
@model IPagedList<ShowPin.MvcPaging.Demo.Models.Product>
@{
    ViewBag.Title = "自定义页码路由键值对";
}
<h2>浏览所有产品——使用自定义的分页键代替默认的分页键</h2>
<table class="table">
    <thead>
        <tr>
            <th>产品名称</th>
            <th>分类名称</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var product in Model.Source)
        {
            <tr>
                <td>@product.Name</td>
                <td>@product.Category</td>
            </tr>
        }
    </tbody>
</table>
@Html.Pager(Model.PageSize, Model.CurrentPage, Model.TotalItemCount).Options(o => o.HtmlAttributes(new { @class = "pagination pagination-large" }).PageRouteValueKey("Search.page"))
